module namelist_mod

	use const_mod, only: r8

	implicit none

	character(256) :: case_name = 'N/A'
	character(256) :: test_case = 'N/A'
	
	character(256) :: advection_scheme = 'N/A'
	character(256) :: adv_hori_scheme  = 'N/A'
	character(256) :: adv_vert_scheme  = 'N/A'

	character(256) :: ffsl_flux_type      = 'N/A'
	character(256) :: ffsl_limiter_type   = 'N/A'

	logical        :: upwind_hori_fct = .false.
	logical        :: upwind_vert_fct = .false.

	logical        :: tracer_vert_ieva = .false.
	integer        :: num_lon
	integer        :: num_lat
	integer        :: num_lev = 1
	integer        :: ntracers = 4
	integer        :: run_days = 1
	
	real(8)        :: dt_adv
	real(r8)       :: history_interval = 3600

	namelist /ffsl_params/         &
		       ntracers            , &
           case_name           , &
           test_case           , &
           num_lon             , &
           num_lat             , &
           num_lev             , &
           dt_adv              , &
           run_days            , &
           advection_scheme    , &
           adv_hori_scheme     , &
           adv_vert_scheme     , &
           ffsl_flux_type , &
           ffsl_limiter_type   , &
           upwind_hori_fct     , &
           upwind_vert_fct     , &
           tracer_vert_ieva    , &
           history_interval          

contains

	subroutine parse_namelist(file_path)

		character(*), intent(in) :: file_path
		open(10, file=file_path, status='old')
		read(10, nml=ffsl_params)
		close(10)

	end subroutine parse_namelist

end module namelist_mod